-
Notifications
You must be signed in to change notification settings - Fork 99
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Poll for expired session #82
Conversation
…rge/hermes into jeffdaley/mirage-me
@onDismiss={{this.dismiss}} | ||
@onDismiss={{close}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We used to pass in a no-op based on the now-outdated idea that dismissOnClick
is always true.
85806a6
to
8e907a9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, LGTM
web/app/services/session.ts
Outdated
headers: { | ||
"Hermes-Google-Access-Token": this.data.authenticated.access_token, | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not strictly necessary because the fetch service adds this automatically for backend requests.
* Add fetch to tsconfig * Fix type errors * Show reauthentication toast when logged out * Add test; add `basicTimeout` * Set up basic 401 handler * Move variable out of class * Update Mirage's `me` handling; Update tests * Add `isPollCall` argument to fetch * Add `me` to Mirage; Update tests * Add `me` to Mirage * Revert `create('me')` changes * Add /me endpoint to determine if the user is currently authenticated * Revert stub endpoint * Update endpoint * Cleanup; documentation * Fix merge error * Remove redundant headers --------- Co-authored-by: Josh Freda <[email protected]>
Adds a repeating function to check if the user's auth token has expired.
Shows a flashMessage if it is: